package com.briup.app02.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.briup.app02.bean.AccountEmployeeExample;
import com.briup.app02.bean.AccountSystem;
import com.briup.app02.bean.AccountSystemExample;
import com.briup.app02.dao.AccountSystemMapper;
import com.briup.app02.dao.extend.AccountSystemExtendMapper;
import com.briup.app02.service.IAccountSystemService;

@Service
public class AccountSystemServiceImpl implements IAccountSystemService{
	@Autowired
	private AccountSystemMapper account;
	@Autowired
	private AccountSystemExtendMapper account2;
	@Override
	public List<AccountSystem> findAll() {
		// TODO Auto-generated method stub
		return account.selectByExample(new AccountSystemExample());
	}

	@Override
	public void saveOrUpdate(AccountSystem c1) {
		// TODO Auto-generated method stub
		if(c1.getId()==null) {
			account.updateByExample(c1, new AccountSystemExample());
		}else {
			account.insert(c1);
		}
	}

	@Override
	public AccountSystem findById(Long id) {
		// TODO Auto-generated method stub
		return account.selectByPrimaryKey(id);
	}

	@Override
	public void delete(Long id) {
		// TODO Auto-generated method stub
		account.deleteByPrimaryKey(id);
	}

	@Override
	public List<AccountSystem> pageQuery(int pageIndex, int pageSize, String status, String type, Long beginTime,
			Long endTime) {
		// TODO Auto-generated method stub
		List<AccountSystem> lists=account2.pageQuery(pageIndex, pageSize, status, type, beginTime, endTime);
		return lists;
	}
}
